﻿@model ShoppingCartModel.OrderReviewDataModel
@using Nop.Web.Models.ShoppingCart;
@if (Model.Display)
{
    <div class="order-review-data">
        <ul class="billing-info">
            <li class="title">
                <strong>@T("Order.BillingAddress")</strong>
            </li>
            <li class="name">
                @Model.BillingAddress.FirstName @Model.BillingAddress.LastName
            </li>
            <li class="email">
                @T("Order.Email"): @Model.BillingAddress.Email
            </li>
            @if (Model.BillingAddress.PhoneEnabled)
            {
                <li class="phone">
                    @T("Order.Phone"): @Model.BillingAddress.PhoneNumber
                </li>
            }
            @if (Model.BillingAddress.FaxEnabled)
            {
                <li class="fax">
                    @T("Order.Fax"): @Model.BillingAddress.FaxNumber
                </li>
            }
            @if (Model.BillingAddress.CompanyEnabled && !String.IsNullOrEmpty(Model.BillingAddress.Company))
            {
                <li class="company">
                    @Model.BillingAddress.Company
                </li>
            }
            @if (Model.BillingAddress.StreetAddressEnabled)
            {
                <li class="address1">
                    @Model.BillingAddress.Address1
                </li>
            }
            @if (Model.BillingAddress.StreetAddress2Enabled && !String.IsNullOrEmpty(Model.BillingAddress.Address2))
            {
                <li class="address2">
                    @Model.BillingAddress.Address2
                </li>
            }
            @if (Model.BillingAddress.CityEnabled ||
                Model.BillingAddress.StateProvinceEnabled ||
                Model.BillingAddress.ZipPostalCodeEnabled)
            {
                <li class="city-state-zip">
                    @if (Model.BillingAddress.CityEnabled)
                    {
                        @Model.BillingAddress.City
                    }
                    @if (Model.BillingAddress.CityEnabled && (Model.BillingAddress.StateProvinceEnabled || Model.BillingAddress.ZipPostalCodeEnabled))
                    {
                        <text>,</text>
                    }
                    @if (Model.BillingAddress.StateProvinceEnabled)
                    {
                        @Model.BillingAddress.StateProvinceName
                    }
                    @if (Model.BillingAddress.ZipPostalCodeEnabled)
                    {
                        @Model.BillingAddress.ZipPostalCode
                    }
                </li>
            }
            @if (Model.BillingAddress.CountryEnabled && !String.IsNullOrEmpty(Model.BillingAddress.CountryName))
            {
                <li class="country">
                    @Model.BillingAddress.CountryName
                </li>
            }
            @if (!String.IsNullOrEmpty(Model.PaymentMethod))
            {
                <li class="title">
                        <strong>@T("Order.PaymentMethod")</strong>
                </li>
                <li class="payment-method">
                        @Model.PaymentMethod
                </li>
            }
        </ul>
        @if (Model.IsShippable)
        {
            <ul class="shipping-info">
                @if (!Model.SelectedPickUpInStore)
                {
                    <li class="title">
                        <strong>
                            @T("Order.ShippingAddress")</strong>
                    </li>
                    <li class="name">
                        @Model.ShippingAddress.FirstName @Model.ShippingAddress.LastName
                    </li>
                    <li class="email">
                        @T("Order.Email"): @Model.ShippingAddress.Email
                    </li>
                    if (Model.ShippingAddress.PhoneEnabled)
                    {
                        <li class="phone">
                            @T("Order.Phone"): @Model.ShippingAddress.PhoneNumber
                        </li>
                    }
                    if (Model.ShippingAddress.FaxEnabled)
                    {
                        <li class="fax">
                            @T("Order.Fax"): @Model.ShippingAddress.FaxNumber
                        </li>
                    }
                    if (Model.ShippingAddress.CompanyEnabled && !String.IsNullOrEmpty(Model.ShippingAddress.Company))
                    {
                        <li class="company">
                            @Model.ShippingAddress.Company
                        </li>
                    }
                    if (Model.ShippingAddress.StreetAddressEnabled)
                    {
                        <li class="address1">
                            @Model.ShippingAddress.Address1
                        </li>
                    }
                    if (Model.ShippingAddress.StreetAddress2Enabled && !String.IsNullOrEmpty(Model.ShippingAddress.Address2))
                    {
                        <li class="address2">
                            @Model.ShippingAddress.Address2
                        </li>
                    }
                    if (Model.ShippingAddress.CityEnabled ||
                        Model.ShippingAddress.StateProvinceEnabled ||
                        Model.ShippingAddress.ZipPostalCodeEnabled)
                    {
                        <li class="city-state-zip">
                            @if (Model.ShippingAddress.CityEnabled)
                            {
                                @Model.ShippingAddress.City
                            }
                            @if (Model.ShippingAddress.CityEnabled && (Model.ShippingAddress.StateProvinceEnabled || Model.ShippingAddress.ZipPostalCodeEnabled))
                            {
                                <text>,</text>
                            }
                            @if (Model.ShippingAddress.StateProvinceEnabled)
                            {
                                @Model.ShippingAddress.StateProvinceName
                            }
                            @if (Model.ShippingAddress.ZipPostalCodeEnabled)
                            {
                                @Model.ShippingAddress.ZipPostalCode
                            }
                        </li>
                    }
                    if (Model.ShippingAddress.CountryEnabled && !String.IsNullOrEmpty(Model.ShippingAddress.CountryName))
                    {
                        <li class="country">
                            @Model.ShippingAddress.CountryName
                        </li>
                    }
                }
                <li class="title">
                    <strong>@T("Order.ShippingMethod")</strong>
                </li>
                <li class="shipping-method">
                    @Model.ShippingMethod
                </li>
            </ul>
        }
    </div>
}